<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <!-- 包含头部信息用于适应不同设备
     width 属性控制设备的宽度。假设您的网站将被带有不同屏幕分辨率的设备浏览，那么将它设置为 device-width 可以确保它能正确呈现在不同设备上。
     nitial-scale=1.0 确保网页加载时，以 1:1 的比例呈现，不会有任何的缩放。
     通常情况下，maximum-scale=1.0 与 user-scalable=no 一起使用。这样禁用缩放功能后，用户只能滚动屏幕，就能让您的网站看上去更像原生应用的感觉。
    -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <!-- 包含 bootstrap 样式表 -->
    <link rel="stylesheet" href="<?php echo base_url();?>lib/bootstrap-3.3.0/css/bootstrap.min.css">
    <!--状态栏和导航栏的样式-->
    <link rel="stylesheet" href="<?php echo base_url();?>navigation.css">
	<script type="text/javascript" src="<?php echo base_url();?>lib/jquery/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>lib/bootstrap-3.3.0/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>src/LocalResizeIMG.js"></script>
    <!-- mobileBUGFix.js 兼容修复移动设备 -->
    
    <script type="text/javascript" src="<?php echo base_url();?>src/mobileBUGFix.mini.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>src/item2.js"></script>

    <script type="text/javascript" src="<?php echo base_url();?>src/common.js"></script>
    <title>图文编辑</title>
    <style rel="stylesheet">
        body, div, p, span, img {
        margin: 0px;
        padding: 0px;
    }
        body {
    }
        #container, #container div {
        margin: 0px;
        padding: 0px;
    }
    #line {
        height: 2px;
        width: 100%;
        background-color: #eeeeee;
    }
    #container #pic_header {
        background-color: rgb(250, 214, 40);
        height: 14px;
        margin-left: 14px;
    }
    #container #title_bottom {
        background-color: rgb(250, 214, 40);
        height: 2px;
        margin-left: 14px;
    }
    #container #pic_body {
        margin-left: 14px;
        text-align: center;
        height: 150px;
    }
    #pic_body img {
        width: 100%;
        height: 150px;
    }
    #container #content_title {
        padding-left: 28px;
        padding-top: 30px;
        font-size: 24px;
        color: #030303;
        font-weight: bold;
    }
    #container #content_body {
        font-size: 13px;
        color: #868686;
        padding-left: 28px;
        padding-top: 18px;
    }

    #container #main_show {
        display: block;
    }
    #container #main_edit {
        display: block;
    }

    #container #div_camera {
        margin: 14px 14px;
        border: 2px solid #eeeeee;
        height: 225px;
        text-align: center;
        line-height: 225px;
    }
    #container #div_title {
        margin: 0px 14px;
        
    }
    #container #div_content {
        margin: 14px 14px;
    }
    #container #title_input {
        width: 100%;
        height: 46px;
        padding: 0px 14px;
        border: 2px solid #eeeeee;
        font-weight: bold;
        font-size: 24px;
    }
    #container #content_area {
        width: 100%;
        height: 200px;
        padding: 16px 14px;
        border: 2px solid #eeeeee;
        font-size: 15px;
    }
    #container #uploadInput {
        width: 0px;
        height: 0px;
    }

    </style>
</head>
<body>
    <div class="container-fluid" id="container">
    <div class="row" id="header_row">
        <div class="col-xs-2" id="header_back">
            <?php if ($static) { ?>
            <img src="<?php echo base_url()?>res/images/template1/back_nor.png" alt="返回">
            <?php } ?>
        </div>
        <div class="col-xs-8" id="header_title">图文编辑</div>
        <div class="col-xs-2"></div>
    </div>

        <div></div>
    	<?php if($static){?>
        <div id="main_show">
        <input type="hidden" name="color" id="color" value="<?php echo $color;?>" />
            <div id="pic_header"></div>
        <div id="pic_body">
            <img src="<?php echo base_url();?><?php if($img_path){ echo $img_path;}else{ echo "res/images/template1/item1_pic.png";}?>">
            
        </div>
        <div id="content_title"><p><?php echo $title;?></p></div>
        <div id="title_bottom"></div>
        <div id="content_body">
            <p> <?php echo $contents;?></p>
        </div>
        </div>
        <?php }else{?>
        
        <div id="main_edit">
        <form id="save_intro" action="" method="post" enctype ="multipart/form-data">
	        <input type="hidden" name="site_id" value="<?php echo $site_id;?>" />
			<input type="hidden" name="t_id" value="<?php echo $t_id;?>" />
			<input type="hidden" name="color" id="color" value="<?php echo $color;?>" />
	            <div id="line"></div>
	            <!-- 上传图片 -->
	            <div id="div_camera">
	                <input id="uploadInput" name="picture" type="file" accept="image/*;capture=camera">
	                        <a id="uploadImgLink" href="javascript:void(0)">
	                            <img id="uploadImg" class="img-rounded" src="<?php echo base_url();?><?php if($img_path){ echo $img_path;}else{ echo "res/images/base_info/camera.png";}?>" width="60px" height="60px">
	                        </a>    
	            </div>
	            <div id="div_title">
	                <input id="title_input" id="title" name="title" type="text" value="<?php echo $title;?>" type="text" placeholder="标题">
	            </div>
	            <div id="div_content">
	            <textarea id="content_area" name="content" placeholder="内容"><?php echo $contents;?></textarea>
	            </div>
            </form>
        </div>
		<?php }?>
    </div>
<input type="hidden" name="static" id="static" value="<?php echo $static;?>" />
    <?php if (!$static) { ?>
    <!-- 下一步 -->
    <div class="contaienr-fluid" id="footer_row">
        <div class="row">
            <div class="col-xs-6 text-center" id="nav_back">返回</div>
            <div class="col-xs-6 text-center" id="nav_next">下一步</div>
        </div>
    </div>
    <?php } ?>
</body>
</html>